<?php
/* @var $this PosteController */
/* @var $model POSTE */

$this->breadcrumbs=array(
	'Postes'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Ajouter un poste', 'url'=>array('poste/create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#poste-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h2>Postes</h2>


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'poste-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		'ID_POSTE',
		'NUM_SERIE',
		'REFERENCE_CONSTRUCTEUR',
		'CONSTRUCTEUR',
		array(
			'class'=>'CButtonColumn',
			'viewButtonUrl'=>'Yii::app()->createUrl("poste/view",array("id"=>$data->primaryKey))',
			'updateButtonUrl'=>'Yii::app()->createUrl("poste/update",array("id"=>$data->primaryKey))',
			'deleteButtonUrl'=>'Yii::app()->createUrl("poste/delete",array("id"=>$data->primaryKey))',
		),
	),
)); ?>
